﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>您心中的英国印象</title>
<link href="css/popup.css" rel="stylesheet" type="text/css" />
    <script src="js/jquery-1.3.2.js" type="text/javascript"></script>
    <script type="text/javascript">
        var chineseCode = 2052;
        //发送请求
        function LoadPost()
        { 
          $.post(
        "result.aspx", { code: chineseCode },
         function (data) {

           
            if (data != "0") {
                Fillzone(data)

            } else {
                alert("网络连接异常");
            }


           }
        );
        }
        //填充
        function Fillzone(data) {
        
         var sT = "<li><span>";
    
        var eN = "</span></li><li><img src=";
                
          var last1N= "images/icon_vote_"
          var last2N = ".gif height='20'  width='";

          var last3N = "'/></li>";
          
          var lastHtml = "";
          var newdata = data.split('|');
          var tst = 0;
          var st = 0;
        for (var i = 0; i < newdata.length; i++) {
            var thtml = newdata[i].toString();

            st = parseInt(thtml.substring(thtml.indexOf(',') + 1, thtml.indexOf('票')));
            lastHtml += sT + thtml + eN + last1N + (i + 1) + last2N + st + last3N;
            tst += st;
          
        }

        document.getElementById("ts").innerHTML = tst.toString();
    document.getElementById("FillZone").innerHTML = lastHtml;
        }
    </script>
</head>
<body onload="LoadPost()">
<div id="vote">
	<div class="close"><a href="#" onclick="parent.tb_remove();"><img src="images/icon_vote_close.gif" alt="" /></a></div>
    <div class="content">
    	<div class="title">选票结果</div>
        <div class="result">
        	<ul id="FillZone" >
            	<!--<li><span>创意的</span> (33%, 333票)</li>
                <li><img src="images/icon_vote_1.gif" width="100" height="20" alt="" /></li>
                <li><span>设计的</span> (33%, 1234票)</li>
                <li><img src="images/icon_vote_2.gif" width="200" height="20" alt="" /></li>
                <li><span>艺术的</span> (33%, 555票)</li>
                <li><img src="images/icon_vote_3.gif" width="300" height="20" alt="" /></li>
                <li><span>深沉内敛的</span> (33%, 789票)</li>
                <li><img src="images/icon_vote_4.gif" width="400" height="20" alt="" /></li>
                <li><span>古板的</span> (33%, 12票)</li>
                <li><img src="images/icon_vote_5.gif" width="150" height="20" alt="" /></li>
                <li><span>文学的</span> (33%, 98765票)</li>
                <li><img src="images/icon_vote_6.gif" width="270" height="20" alt="" /></li>
                <li><span>有活力的</span> (33%, 111票)</li>
                <li><img src="images/icon_vote_7.gif" width="90" height="20" alt="" /></li>
                <li><span>创新的</span> (33%, 222票)</li>
                <li><img src="images/icon_vote_8.gif" width="110" height="20" alt="" /></li>
                <li><span>疯狂的</span> (33%, 333票)</li>
                <li><img src="images/icon_vote_9.gif" width="410" height="20" alt="" /></li>
                <li><span>绅士的</span> (33%, 444票)</li>
                <li><img src="images/icon_vote_10.gif" width="290" height="20" alt="" /></li>-->
            </ul>
        </div>
        <h5>共<span id="ts"></span>票</h5>
        <div class="resultbtn"><a href="#" onclick="parent.tb_remove();"><img src="images/btn_close.gif" alt="" /></a></div>
    </div>
</div>
</body>
</html>
